-
Notifications
You must be signed in to change notification settings - Fork 3k
adding response format samples #41944
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature/azure-ai-agents/1.1.0b4
Are you sure you want to change the base?
adding response format samples #41944
Conversation
with project_client: | ||
agents_client = project_client.agents | ||
|
||
# [START create_agent_with_json_schema_response_format] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We cannot have these in many samples, because README samples may get broken
[START create_agent_with_json_schema_response_format]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove these if not needed in README
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
run = agents_client.runs.create(thread_id=thread.id, agent_id=agent.id) | ||
|
||
# Poll the run as long as run status is queued or in progress | ||
while run.status in ["queued", "in_progress", "requires_action"]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: let us say
run = agents_client.runs.create_and_process(thread_id=thread.id, agent_id=agent.id)
...azure-ai-agents/samples/agents_response_formats/sample_agents_json_schema_response_format.py
Show resolved
Hide resolved
message = agents_client.messages.create(thread_id=thread.id, role="user", content="Hello, give me a list of planets in our solar system.") | ||
print(f"Created message, message ID: {message.id}") | ||
|
||
run = agents_client.runs.create(thread_id=thread.id, agent_id=agent.id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: let us say
run = agents_client.runs.create_and_process(thread_id=thread.id, agent_id=agent.id)
adding response format samples